package com.example.untils;

import com.baomidou.mybatisplus.core.toolkit.StringUtils;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeParseException;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.regex.Pattern;

public class EntityCodeGenerator {

    private  static ArrayList<String> str = new ArrayList<>();
    /**
     * <p>
     * 读取控制台内容
     * </p>
     */
    public static void scanner() {
        Scanner scanner = new Scanner(System.in);
        StringBuilder help = new StringBuilder();
//        help.append("请输入"  + "：");
//        System.out.println(help.toString());
        while (scanner.hasNext()) {
            String ipt = scanner.next();
            if (StringUtils.isNotBlank(ipt)) {
                if(ipt.equals("overzzz")) break;
                str.add(ipt);
            }
        }
    }
    private static final String DATE_PATTERN = "^((19|20)\\d\\d)-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$";
    public static boolean isDate(String date) {
        return Pattern.matches(DATE_PATTERN, date);
    }

    public static boolean isValidDate(String str) {

        // 定义可能的日期格式
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("uuuu/M/d");
        // 尝试解析日期字符串
        try {
            LocalDate date = LocalDate.parse(str, formatter);

            // 检查日期是否合法
            if (date.getDayOfMonth() != Integer.parseInt(str.split("/")[2])) {
                throw new DateTimeParseException("Invalid day of month", str, 0);
            }
            System.out.println(str + " 的格式正确");
            return true;
        } catch (DateTimeParseException e) {
            System.out.println(str + " 的格式不正确");
            return false;
        }
    }


    public static boolean isInteger(String str) {
        if(com.example.untils.StringUtils.isEmpty(str)) return false;
        // 使用正则表达式判断字符串是否为纯正整数
        return str.matches("^[1-9]\\d*$");
    }

    /**
     * 判断字符串是否为正数
     * @param str
     * @return
     */
    public static boolean isNumber(String str) {
        // 使用正则表达式判断字符串是否为数字类型
        return str.matches("^[0-9]+(\\.[0-9]+)?$");
    }

    public static void getPermiss() {
        String str = "查询 NYYYYYYYYYYYYYYY\n" +
                " 更改 YNYYYYYYYYYYYYYY\n" +
                " 删除 YYNYYYYYYYYYYYYY\n" +
                " 审核 YYYNYYYYYYYYYYYY\n" +
                " 撤审 YYYYNYYYYYYYYYYY\n" +
                " 作废 YYYYYYNYYYYYYYYY\n";
        String[] strings = str.split(" ");
        ArrayList<String> arr = new ArrayList();
        for(int i = 0; i < strings.length; i++) {
            if(com.example.untils.StringUtils.isNotEmpty(strings[i])) {
                arr.add(strings[i]);
            }
        }
//        System.out.println(arr.size());
//        for(int i = 0; i < arr.size(); i++) {
//            System.out.println(i + "-->" + arr.get(i));
//        }
        for(int i = 0; i < arr.size(); i++) {
            System.out.print(arr.get(i) + " --> ");
            String string = arr.get(i + 1);
            for(int j = 0; j < string.length(); j++) {
                if(string.charAt(j) == 'Y') continue;
                System.out.println(j + 1); break;
            }
            i++;
        }
//        System.out.println(i + "--" + strings[i]);

    }

    public static String removeLastDash(String input) {
        return input.substring(0, input.lastIndexOf('-') != -1 ? input.lastIndexOf('-') : input.length());
    }

    public static void main(String[] args) throws Exception{
        if(com.example.untils.StringUtils.isEmpty("17569               ")) {
            System.out.println("gfff");
        }else{
            System.out.println("gggg");
        }


//        MyTopologicalSort sort = new MyTopologicalSort();
//        int n = 3;
//        List<EageDto> eageDtos = new ArrayList<>();
//        eageDtos.add(new EageDto(1, 2));
//        eageDtos.add(new EageDto(2, 3));
//        eageDtos.add(new EageDto(3, 2));
//        int cycle = sort.haveCycle(n, eageDtos);
//        System.out.println(cycle);


//        String time = "2024-11-18 10:30:00";
//        String tim2 = "2024-11-18 12:20:00";
//
//        long differenceInHours = TimeUtils.getDifferenceInHours(time, tim2);
//        System.out.println(differenceInHours);


//        WebSocketContainer container = ContainerProvider.getWebSocketContainer();
//        URI uri = new URI("ws://localhost:8000/websocket/DS");
//        Session session = container.connectToServer(WebSocketClient.class, uri);
//        session.getBasicRemote().sendText("Hello, WebSocket server!");

//        String s= "ASOC^ASO2024-005244^0003";
//        String[] strings = s.split("\\^");
//        System.out.println();

//        HzMoctaView view = new HzMoctaView();
//        System.out.println(view.toString());

//        Map<String, String> map = new HashMap<>();
//        map.put("HI-435B 碗型底座", "ffff");
//        System.out.println(map.get("HI-435B 碗型底座"));

//        System.out.println(removeLastDash("AMM2023-005589-01"));
//        Set s1 = new HashSet();
//        Set s2 = new HashSet();
//        s1.add("1");  s1.add("2");
//        s2.add("1");  s2.add("2"); s2.add("3");  s2.add("4");
//        Set s3 = new HashSet(s1);
//        s3.removeAll(s2);
//        System.out.println(s1);
//        System.out.println(s2);
//        System.out.println(s3);


//        HzBommfView b1 = new HzBommfView();
//        b1.setMF001("1");  b1.setMF002("2");  b1.setMF003("3");
//        b1.setInvrt_name("5"); b1.setIsDefault("4");
//        HzBommfView b2 = new HzBommfView();
//        b2.setMF001("1");  b2.setMF002("2");  b2.setMF003("3");
//        b2.setInvrt_name("5"); b2.setIsDefault("4");
//        b2.setMF004("P4");  b2.setMF005("P5");
//
//        System.out.println(b1.equals(b2));
//        Map<HzBommfView, HzBommfView> map = new HashMap();
//        map.put(b1, b1);
//        System.out.println(map.get(b2));
//
//        Set<HzBommfView> set = new HashSet<>();
//        set.add(b1);
//        set.remove(b2);
//        System.out.println(set);

//        BommeView bomme1 = new BommeView();
//        bomme1.setME001("1");  bomme1.setME002("2"); bomme1.setME003("3");
//        BommeView bomme2 = new BommeView();
//        bomme2.setME001("1");  bomme2.setME002("2"); bomme2.setME003("3");
//
//        System.out.println(bomme1 == bomme2);
//        System.out.println(bomme1.equals(bomme2));
//        Set<BommeView> set = new HashSet<>();
//        set.add(bomme1);  set.remove(bomme2);
//        System.out.println(set);
//
//        Map<BommeView, BommeView> map = new HashMap<>();
//        map.put(bomme1, bomme1);
//        System.out.println(map.get(bomme2));

//        HzCmsmeView t = new HzCmsmeView();
//        t.setSTATE("啟用");
//        t.setME001("901");
//        t.setME002("供應鏈部門");
//        t.setModified_time("2024-10-11 16:12:33.613");
//        HzCmsmeView cmsmeView = LanguageConversionUtils.convertToSimplifiedChinese(t);
//        System.out.println(cmsmeView);

//        Set<String> s1 = new HashSet<>();
//        s1.add("1");  s1.add("2");  s1.add("3"); s1.add("4");
//
//        Set<String> s2 = new HashSet<>();
//        s2.add("3"); s2.add("4"); s2.add("5");
//        s1.removeAll(s2);
//        System.out.println(s1);
//        System.out.println(s2);

//        System.out.println(TimeUtils.getHzViewTime());

//        System.out.println(TimeUtils.getSecondsDifference(TimeUtils.getNowTime(), "20240927151400"));

//        LocalDateTime now = LocalDateTime.now();
//
//        // 给定时间字符串
//        String targetTimeString = "20240410141913473"; // 包含毫秒部分
//
//        // 计算时间差
//        long secondsDifference = TimeUtils.getSecondsDifference(now, targetTimeString);
//        System.out.println("当前时间与目标时间相差的秒数: " + secondsDifference);

//        // 指定一个日期
//        LocalDate specifiedDate = LocalDate.of(2024, 7, 1); // 例如指定为 2024-07-17
//
//        // 假设要加的天数或减去的天数
//        int daysToAddOrSubtract = -5; // 可以为负数，表示减去天数
//
//        // 加上或减去指定天数后的日期
//        LocalDate manipulatedDate = specifiedDate.plusDays(daysToAddOrSubtract);
//
//        // 格式化日期为 "YYYYMMDD" 格式
//        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd");
//        String formattedDate = manipulatedDate.format(formatter);
//
//        // 输出结果
//        System.out.println("指定日期: " + specifiedDate);
//        System.out.println("加上或减去 " + daysToAddOrSubtract + " 天后的日期: " + formattedDate);


//        System.out.println(ZhTwConverterUtil.toSimple("上海市真南路829号"));

//        int[] argtt = new int[]{1, 2, 3, 4};
//        for(int i = 0; i < argtt.length; i++) {
//            argtt[i] = 6;
//        }
//
////        for(int arg : argtt) {
////            arg = 6;
////        }
//        for(int arg : argtt) {
//            System.out.println(arg);
//        }


//        getPermiss();
//        String input = "[PurchaseDetailDto(operateMethod = null, creator = ERP, TC001 = APOZ, TC002 = null, TC003 = 20240507, TC004 = I0019, MA002 = 上海晨彤, TC024 = 20240507, TC025 = null, MF002 = null, TC010 = null, TC011 = ZA5419, TC005 = RMB, TC006 = 1.0, TC018 = 1, TC026 = 0.13, TC027 = 97, TC008 = 每月25日定期结款, 自对帐开票日起60天内付款, TC009 = TT0507, TCD01 = null, TC047 = null, TC044 = null, TC045 = null, TC017 = null, TC007 = null, TC012 = null, TC013 = null, TC028 = null, TC021 = null, TC022 = null, TC019 = 535.49, TC023 = 85.0, TC020 = 213.01, TC029 = null, UDF03 = 748.50, purtdList = [PurtdListDto(articleNumber = null, purtbSummary = AAPZ - 20240500001 - 0001, purchaseNumSummary = null, purtbNumSummary = null, TD003 = null, TD004 = DY - F2854, TD005 = F2854蓝绿色粉, TD006 = [符合DKL M版规范] 100 g / 包, TD007 = null, MC002 = null, TD008 = 10.0, TD015 = null, TD048 = null, MB039 = null, TD009 = 份, TD039 = null, TD038 = null, TD030 = null, TD031 = null, TD049 = null, TD032 = null, TD010 = 5.0, TD033 = 0.13, TD011 = 50.0, TD034 = 44.25, TD035 = 5.75, TD012 = 20240522, TD025 = null, TD014 = 请购来自: AAPZ - 20240500001 - 0001(EX20240501), TD016 = null, TD013 = , TD021 = , TD023 = , TD026 = null, TD027 = null, TD028 = null, TD017 = null, TD029 = null, TDC01 = null, TD045 = null, TDC02 = null, TD046 = null, TDC04 = null, TDC05 = null), PurtdListDto(articleNumber = null, purtbSummary = AAPZ - 20240500001 - 0002, purchaseNumSummary = null, purtbNumSummary = null, TD003 = null, TD004 = DY - 2614 - W, TD005 = 2614 白色, TD006 = 用于 #475料, TD007= null, MC002 = null, TD008 = 10.0, TD015 = null, TD048 = null, MB039 = null, TD009 = 包, TD039 = null, TD038 = null, TD030 = null, TD031 = null, TD049 = null, TD032 = null, TD010 = 5.0, TD033 = 0.13, TD011 = 50.0, TD034 = 44.25, TD035 = 5.75, TD012 = 20240522, TD025 = null, TD014 = 请购来自: AAPZ - 20240500001 - 0002(EX20240502), TD016 = null, TD013 = , TD021 = , TD023 = , TD026 = null, TD027 = null, TD028 = null, TD017 = null, TD029 = null, TDC01 = null, TD045 = null, TDC02 = null, TD046 = null, TDC04 = null, TDC05 = null), PurtdListDto(articleNumber = null, purtbSummary = AAPZ - 20240500001 - 0003, purchaseNumSummary = null, purtbNumSummary = null, TD003 = null, TD004 = DY - F2661 - G, TD005 = DY - F2661 - G 嫩绿色色粉, TD006 = [符合ROHS / FDA食品级] 140 g / 包, TD007 = null, MC002 = null, TD008 = 5.0, TD015 = null, TD048 = null, MB039 = null, TD009 = 包, TD039 = null, TD038 = null, TD030 = null, TD031 = null, TD049 = null, TD032 = null, TD010 = 11.0, TD033 = 0.13, TD011 = 55.0, TD034 = 48.67, TD035 = 6.33, TD012 = 20240507, TD025 = null, TD014 = 请购来自: AAPZ - 20240500001 - 0003, TD016 = null, TD013 = , TD021 = , TD023 = , TD026 = null, TD027 = null, TD028 = null, TD017 = null, TD029 = null, TDC01 = null, TD045 = null, TDC02 = null, TD046 = null, TDC04 = null, TDC05 = null), PurtdListDto(articleNumber = null, purtbSummary = AAPZ - 20240500001 - 0004, purchaseNumSummary = null, purtbNumSummary = null, TD003 = null, TD004 = DY - F2673 - B, TD005 = DY - F2673 - B 蓝绿色色粉, TD006 = [符合ROHS / FDA食品级] 60 g / 包, TD007 = null, MC002 = null, TD008 = 5.0, TD015 = null, TD048 = null, MB039 = null, TD009 = 包, TD039 = null, TD038 = null, TD030 = null, TD031 = null, TD049 = null, TD032 = null, TD010 = 10.0, TD033 = 0.13, TD011 = 50.0, TD034 = 44.25, TD035 = 5.75, TD012 = 20240522, TD025 = null, TD014 = 请购来自: AAPZ - 20240500001 - 0004, TD016 = null, TD013 = , TD021 = , TD023 = , TD026 = null, TD027 = null, TD028 = null, TD017 = null, TD029 = null, TDC01 = null, TD045 = null, TDC02 = null, TD046 = null, TDC04 = null, TDC05 = null), PurtdListDto(articleNumber = null, purtbSummary = AAPZ - 20240500001 - 0006, purchaseNumSummary = null, purtbNumSummary = null, TD003 = null, TD004 = DY - F3075, TD005 = DY - F3075 桔黄色色粉, TD006 = [符合DKL M版规范] 130 g / 包, TD007 = null, MC002 = null, TD008 = 5.0, TD015 = null, TD048 = null, MB039 = null, TD009 = 份, TD039 = null, TD038 = null, TD030 = null, TD031 = null, TD049 = null, TD032 = null, TD010 = 12.0, TD033 = 0.13, TD011 = 60.0, TD034 = 53.1, TD035 = 6.9, TD012 = 20240522, TD025 = null, TD014 = 请购来自: AAPZ - 20240500001 - 0006, TD016 = null, TD013 = , TD021 = , TD023 = , TD026 = null, TD027 = null, TD028 = null, TD017 = null, TD029 = null, TDC01 = null, TD045 = null, TDC02 = null, TD046 = null, TDC04 = null, TDC05 = null), PurtdListDto(articleNumber = null, purtbSummary = AAPZ - 20240500001 - 0007, purchaseNumSummary = null, purtbNumSummary = null, TD003 = null, TD004 = DY - F3076, TD005 = DY - F3076 黄色色粉, TD006 = [符合DKL M版规范] 140 g / 包, TD007 = null, MC002 = null, TD008 = 5.0, TD015 = null, TD048 = null, MB039 = null, TD009 = 份, TD039 = null, TD038 = null, TD030 = null, TD031 = null, TD049 = null, TD032 = null, TD010 = 13.0, TD033 = 0.13, TD011 = 65.0, TD034 = 57.52, TD035 = 7.48, TD012 = 20240522, TD025 = null, TD014 = 请购来自: AAPZ - 20240500001 - 0007, TD016 = null, TD013 = , TD021 = , TD023 = , TD026 = null, TD027 = null, TD028 = null, TD017 = null, TD029 = null, TDC01 = null, TD045 = null, TDC02 = null, TD046 = null, TDC04 = null, TDC05 = null), PurtdListDto(articleNumber = null, purtbSummary = AAPZ - 20240500001 - 0008, purchaseNumSummary = null, purtbNumSummary = null, TD003 = null, TD004 = DY - F3077, TD005 = DY - F3077 果绿色色粉, TD006 = [符合DKL M版规范] 160 g / 包, TD007 = null, MC002 = null, TD008 = 5.0, TD015 = null, TD048 = null, MB039 = null, TD009 = 份, TD039 = null, TD038 = null, TD030 = null, TD031 = null, TD049 = null, TD032 = null, TD010 = 14.5, TD033 = 0.13, TD011 = 72.5, TD034 = 64.16, TD035 = 8.34, TD012 = 20240522, TD025 = null, TD014 = 请购来自: AAPZ - 20240500001 - 0008, TD016 = null, TD013 = , TD021 = , TD023 = , TD026 = null, TD027 = null, TD028 = null, TD017 = null, TD029 = null, TDC01 = null, TD045 = null, TDC02 = null, TD046 = null, TDC04 = null, TDC05 = null), PurtdListDto(articleNumber = null, purtbSummary = AAPZ - 20240500001 - 0010, purchaseNumSummary = null, purtbNumSummary = null, TD003 = null, TD004 = DY - F4061, TD005 = DY - F4061 深红色粉, TD006 = [符合DKL M版规范] 110 g / 包, TD007 = null, MC002 = null, TD008 = 5.0, TD015 = null, TD048 = null, MB039 = null, TD009 = 包, TD039 = null, TD038 = null, TD030 = null, TD031 = null, TD049 = null, TD032 = null, TD010 = 8.5, TD033 = 0.13, TD011 = 42.5, TD034 = 37.61, TD035 = 4.89, TD012 = 20240522, TD025 = null, TD014 = 请购来自: AAPZ - 20240500001 - 0010, TD016 = null, TD013 = , TD021 = , TD023 = , TD026 = null, TD027 = null, TD028 = null, TD017 = null, TD029 = null, TDC01 = null, TD045 = null, TDC02 = null, TD046 = null, TDC04 = null, TDC05 = null), PurtdListDto(articleNumber = null, purtbSummary = AAPZ - 20240500001 - 0011, purchaseNumSummary = null, purtbNumSummary = null, TD003 = null, TD004 = DY - F4087, TD005 = F4087 鲜红色粉, TD006 = [符合DKL M版规范] 180 g / 包, TD007 = null, MC002 = null, TD008 = 5.0, TD015 = null, TD048 = null, MB039 = null, TD009 = 份, TD039 = null, TD038 = null, TD030 = null, TD031 = null, TD049 = null, TD032 = null, TD010 = 7.0, TD033 = 0.13, TD011 = 35.0, TD034 = 30.97, TD035 = 4.03, TD012 = 20240522, TD025 = null, TD014 = 请购来自: AAPZ - 20240500001 - 0011, TD016 = null, TD013 = , TD021 = , TD023 = , TD026 = null, TD027 = null, TD028 = null, TD017 = null, TD029 = null, TDC01 = null, TD045 = null, TDC02 = null, TD046 = null, TDC04 = null, TDC05 = null), PurtdListDto(articleNumber = null, purtbSummary = AAPZ - 20240500001 - 0012, purchaseNumSummary = null, purtbNumSummary = null, TD003 = null, TD004 = DY - F4148, TD005 = F4148 咖啡色粉, TD006 = [符合ROHS / 不含邻苯二甲酸盐(3 类)] 120 g / 包, TD007 = null, MC002 = null, TD008 = 5.0, TD015 = null, TD048 = null, MB039 = null, TD009 = 包, TD039 = null, TD038 = null, TD030 = null, TD031 = null, TD049 = null, TD032 = null, TD010 = 6.0, TD033 = 0.13, TD011 = 30.0, TD034 = 26.55, TD035 = 3.45, TD012 = 20240522, TD025 = null, TD014 = 请购来自: AAPZ - 20240500001 - 0012, TD016 = null, TD013 = , TD021 = , TD023 = , TD026 = null, TD027 = null, TD028 = null, TD017 = null, TD029 = null, TDC01 = null, TD045 = null, TDC02 = null, TD046 = null, TDC04 = null, TDC05 = null), PurtdListDto(articleNumber = null, purtbSummary = AAPZ - 20240500001 - 0014, purchaseNumSummary = null, purtbNumSummary = null, TD003 = null, TD004 = DY - F4255, TD005 = DY - F4255 白色色粉, TD006 = [符合ROHS] 180 g / 包, TD007 = null, MC002 = null, TD008 = 5.0, TD015 = null, TD048 = null, MB039 = null, TD009 = 包, TD039 = null, TD038 = null, TD030 = null, TD031 = null, TD049 = null, TD032 = null, TD010 = 9.0, TD033 = 0.13, TD011 = 45.0, TD034 = 39.82, TD035 = 5.18, TD012 = 20240522, TD025 = null, TD014 = 请购来自: AAPZ - 20240500001 - 0014, TD016 = null, TD013 = , TD021 = , TD023 = , TD026 = null, TD027 = null, TD028 = null, TD017 = null, TD029 = null, TDC01 = null, TD045 = null, TDC02 = null, TD046 = null, TDC04 = null, TDC05 = null), PurtdListDto(articleNumber = null, purtbSummary = AAPZ - 20240500001 - 0015, purchaseNumSummary = null, purtbNumSummary = null, TD003 = null, TD004 = DY - F4300, TD005 = F4300 黄色粉, TD006 = [符合ROHS] 130 g / 包, TD007 = null, MC002 = null, TD008 = 5.0, TD015 = null, TD048 = null, MB039 = null, TD009 = 包, TD039 = null, TD038 = null, TD030 = null, TD031 = null, TD049 = null, TD032 = null, TD010 = 7.5, TD033 = 0.13, TD011 = 37.5, TD034 = 33.19, TD035 = 4.31, TD012 = 20240522, TD025 = null, TD014 = 请购来自: AAPZ - 20240500001 - 0015, TD016 = null, TD013 = , TD021 = , TD023 = , TD026 = null, TD027 = null, TD028 = null, TD017 = null, TD029 = null, TDC01 = null, TD045 = null, TDC02 = null, TD046 = null, TDC04 = null, TDC05 = null), PurtdListDto(articleNumber = null, purtbSummary = AAPZ - 20240500001 - 0005, purchaseNumSummary = null, purtbNumSummary = null, TD003 = null, TD004 = DY - F2975 - G, TD005 = F2975 果绿色色粉, TD006 = [符合DKL M版规范] 90 g / 包, TD007 = null, MC002 = null, TD008 = 5.0, TD015 = null, TD048 = null, MB039 = null, TD009 = 份, TD039 = null, TD038 = null, TD030 = null, TD031 = null, TD049 = null, TD032 = null, TD010 = 8.0, TD033 = 13.0, TD011 = 40.0, TD034 = 2.86, TD035 = 37.14, TD012 = 20240522, TD025 = null, TD014 = 请购来自: AAPZ - 20240500001 - 0005, TD016 = null, TD013 = , TD021 = , TD023 = , TD026 = null, TD027 = null, TD028 = null, TD017 = null, TD029 = null, TDC01 = null, TD045 = null, TDC02 = null, TD046 = null, TDC04 = null, TDC05 = null), PurtdListDto(articleNumber = null, purtbSummary = AAPZ - 20240500001 - 0009, purchaseNumSummary = null, purtbNumSummary = null, TD003 = null, TD004 = DY - F3640, TD005 = DY - F3640 白色粉, TD006 = [符合DKL M版] 150 g, TD007 = null, MC002 = null, TD008 = 5.0, TD015 = null, TD048 = null, MB039 = null, TD009 = 包, TD039 = null, TD038 = null, TD030 = null, TD031 = null, TD049 = null, TD032 = null, TD010 = 11.2, TD033 = 13.0, TD011 = 56.0, TD034 = 4.0, TD035 = 52.0, TD012 = 20240522, TD025 = null, TD014 = 请购来自: AAPZ - 20240500001 - 0009, TD016 = null, TD013 = , TD021 = , TD023 = , TD026 = null, TD027 = null, TD028 = null, TD017 = null, TD029 = null, TDC01 = null, TD045 = null, TDC02 = null, TD046 = null, TDC04 = null, TDC05 = null), PurtdListDto(articleNumber = null, purtbSummary = AAPZ - 20240500001 - 0013, purchaseNumSummary = null, purtbNumSummary = null, TD003 = null, TD004 = DY - F4151, TD005 = F4151 黄色粉, TD006 = [符合ROHS / 不含邻苯二甲酸盐(3 类)] 110 g / 包, TD007 = null, MC002 = null, TD008 = 5.0, TD015 = null, TD048 = null, MB039 = null, TD009 = 包, TD039 = null, TD038 = null, TD030 = null, TD031 = null, TD049 = null, TD032 = null, TD010 = 12.0, TD033 = 13.0, TD011 = 60.0, TD034 = 4.29, TD035 = 55.71, TD012 = 20240522, TD025 = null, TD014 = 请购来自: AAPZ - 20240500001 - 0013, TD016 = null, TD013 = , TD021 = , TD023 = , TD026 = null, TD027 = null, TD028 = null, TD017 = null, TD029 = null, TDC01 = null, TD045 = null, TDC02 = null, TD046 = null, TDC04 = null, TDC05 = null)]";
//        // 正则表达式，用于提取键值对
//        Pattern pattern = Pattern.compile("(\\w+)=(null|\\{.*?\\}|[^,]+)");
//        Matcher matcher = pattern.matcher(input);
//
//        Map<String, Object> map = new HashMap<>();
//
//        // 匹配并提取键值对
//        while (matcher.find()) {
//            String key = matcher.group(1);
//            String valueStr = matcher.group(2);
//
//            // 判断值是否是括号包含的内容
//            if (valueStr.startsWith("{") && valueStr.endsWith("}")) {
//                // 如果是括号包含的内容，则将其作为 JSON 对象处理
//                ObjectMapper objectMapper = new ObjectMapper();
//                Map<String, Object> nestedMap = objectMapper.readValue(valueStr, Map.class);
//                map.put(key, nestedMap);
//            } else {
//                // 否则直接存储值
//                Object value = "null".equals(valueStr) ? null : valueStr;
//                map.put(key, value);
//            }
//        }
//
//        // 使用 Jackson 将 Map 转换为 JSON
//        ObjectMapper objectMapper = new ObjectMapper();
//        String json = objectMapper.writeValueAsString(map);
//
//        System.out.println("JSON格式: " + json);



//        System.out.println(isNumber("1.1"));
//        System.out.println(isNumber("-2.1"));
//        System.out.println(isNumber("1"));
//        System.out.println(isNumber("2"));
//        System.out.println(isNumber("-1"));
//        System.out.println(isNumber("0"));

//        Date date = null;
//        try {
//            date = DateUtils.parseDate("2012-1-1");
//        } catch (ParseException e) {
//            throw new RuntimeException(e);
//        }
//        System.out.println(date);

//        LocalDate parse = LocalDate.parse("2012-1-1");
//        System.out.println(parse);
//        NumberUtil
//        String dateStr = "2000/0/0";
//        Date date = DateUtil.parse(dateStr);
//        String format = DateUtil.format(date, "yyyyMMdd");
//        System.out.println(format);
        //        scanner();
//
//        for(int i = 0; i < str.size(); i++) {
//            System.out.println("@ApiModelProperty(\"" + str.get(i) + "\")");
//            System.out.println("@JsonProperty(\"\")");
//            System.out.println("private String " + str.get(i + 1) +";");
//            i++;
//            System.out.println();
//        }
//
//        System.out.println(str);

    }

}
